package com.xmx.ndmallwxapi.feign;


import com.xmx.common.utils.R;
import com.xmx.ndmallwxapi.feign.factory.ProductFallbackFatory;
import com.xmx.ndmallwxapi.feign.factory.PromotionFallbackFatory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Description: 用一句话描述
 * @Auther: 新梦想*陈超
 * @Date: 2021/8/11 11:25
 */
@FeignClient(value="promotion-center",fallbackFactory = PromotionFallbackFatory.class)
public interface PromotionFeignClient {

    @GetMapping("promotioncenter/grouponrules/list")
    R grouponlist();


    @GetMapping("promotioncenter/ad/list")
    R adlist(@RequestParam Map<String, Object> params);

    @GetMapping("promotioncenter/grouponrules/infos/{goods_id}")
    R getBygoodsid(@PathVariable("goods_id") Integer id);

    @GetMapping("promotioncenter/grouponrules/info/{id}")
    R getdetailByid(@PathVariable("id") Integer id);
}
